Skip to content

fix: repair .secrets.baseline (stray uv line breaks detect-secrets hook)#4

Merged
ak2k merged 1 commit into
mainfrom
fix/secrets-baseline
Jun 3, 2026
Merged

fix: repair .secrets.baseline (stray uv line breaks detect-secrets hook)#4
ak2k merged 1 commit into
mainfrom
fix/secrets-baseline

Conversation

@ak2k

@ak2k ak2k commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Problem

.secrets.baseline has a stray first line — Installed 7 packages in 5ms — captured from uv when the baseline was generated via a redirect (uv run detect-secrets scan > .secrets.baseline). That makes the file invalid JSON, so detect-secrets fails with "Unable to read baseline" and the detect-secrets pre-commit hook errors on every run. Anyone who runs pre-commit install then can't commit (without --no-verify).

Fix

Remove the spurious first line. The remainder is a valid v1.5.0 baseline (results: {}). One-line deletion.

Verification

$ python3 -c "import json; json.load(open('.secrets.baseline'))"   # valid
$ pre-commit run --all-files
...
Detect secrets...........................................................Passed

The commit on this branch ran through the hook itself — detect-secrets passed.

The baseline was generated with a redirect like
`uv run detect-secrets scan > .secrets.baseline`, which captured uv's
"Installed 7 packages in 5ms" message as line 1 — making the file invalid
JSON. detect-secrets then fails with "Unable to read baseline", so the
detect-secrets pre-commit hook errors on every run (blocking commits for
anyone with hooks installed).

Remove the spurious first line; the remainder is a valid v1.5.0 baseline
(results: {}). Verified `pre-commit run` now passes detect-secrets.
@ak2k ak2k merged commit b9571e3 into main Jun 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant